English
Home Dialog Popup eXtension Version 1.1.3

Introduction

General Commands
Version

Special Menus

/xpopup Command
-b
-c
-d
-i
-j
-l
-p
-s
-t
-x

$xpopup Identifier
ismenu
style
exstyle
colors
color

/xpop Command
-a
-c
-d
-f
-i
-s
-t

$xpop Identifier
num
text
icon
checked
enabled
submenu

XPopup Item Path

XPopup Events
 

>> Introduction



This DLL lets you build nice stylish popup menus to be used everywhere in your script including coloring mIRC's own popup menus.

XPopup Menu Styles

>> General Commands



These general commands are used in the xpopup extension.

Version



This command lets you get information on the DLL like version number and state.

Command: //echo -a $dll( xpopup.dll, Version, . )

>> Special Menus



There are two XPopup special menus. They are mIRC's regular popup menus (channel, statusbar, query and nicklist) and mIRC's menubar popup menus which include (menubar). The use the reserved menu names mirc and mircbar. They can be activated with the following command :

Command: /mpopup [mirc|mircbar] [1|0]

Both menus can have their style, colors and icons modified using the /xpopup command. The command switches -c/-d are disabled for these menus. You can't use /xpop to modify these menus either. To add icons the mIRC's popups menus (status, menubar, channel, query and nicklist) you need to add the icons the menu image lists using /xpopup -i/-j. The icon index number needs to be inserted in the mIRC popup menu syntax like this :

Syntax: [$style()] [ICON] [VTAB] [Item Text] [TAB] [Accelerator Text] : [mIRC Command]

Parms :
[$style()]mIRC's $style identifier.
[ICON]Icon index number. (You can use 0 for no icon).
[VTAB]mIRC $chr(11).
[Item Text]Menu item text.
[TAB]mIRC $chr(9). (Optional)
[Accelerator Text]Accelerator Text. (Optional)
[mIRC Command]mIRC menu command.

N.B. Accelerator text is usually a shortcut key combination to the same command seen in the menu that which the text is right aligned in the menu item like the CTRL-H seen in the image below.

Remember that the same mIRC popup rules still apply. It is only the menu item text syntax that needs to be shaped for XPopup to interpret it correctly. If the [VTAB] element is not present, XPopup assumes that the item text is a regular no icon element. You can also add $idents in you menu item text like mIRC has always permitted to create your own tri-state check system for example with the use of custom icons.

The image below is an example of a mIRC menubar popup menu skinned with XPopup which includes icons.

XPopup mIRC Colorful Iconed Menus


>> /xpopup Command



The /xpopup command is used to create/modify/destroy an XPopup menu.

-b



This command lets you set the menu item background image in CUSTOM style. Please take note that the image is stretched to fit the menu item rectangle. Only BMP images are supported through this command.

Command: /xpopup -b [MENU] [IMAGE]

Example: /xpopup -b mymenu $mircdirmc.bmp

-c



This command lets you create an XPopup empty menu. Xpopup menus are permanent until destroyed with /xpopup -d or the DLL is unloaded.

Command: /xpopup -c [MENU] [STYLE]

Example: /xpopup -c mymenu office2003rev

Parms :
[MENU]Menu name.
[STYLE]Menu style flags.
  Value :
office2003Office 2003 Menu Style.
office2003revOffice 2003 Reverse Menu Style.
officexpOffice XP Menu Style.
icyIcy Menu Style.
icyrevIcy Reverse Menu Style.
gradeGrade Menu Style.
graderevGrade Reverse Menu Style.
normalNormal Plain Menu Style.
customLet's you apply a custom background item image (see /xpopup -b).
N.B. This command will fail if the menu already exists, use $xpopup().ismenu to check if the menu exists. N.B. Some colors are not used in certain menu styles.

-d



This command lets you destroy an XPopup empty menu.

Command: /xpopup -d [MENU]

Example: /xpopup -d mymenu

-i



This command lets you add an icon to the menu image list.

Command: /xpopup -i [MENU] [INDEX] [FILENAME]

Example: /xpopup -i mymenu 113 C:/mIRC/shell.dll

Parms :
[INDEX]Icon index in icon archive (use 0 if the file is a single icon file)
[FILENAME]Icon archive filename

-j



This command lets you clear the menu image list.

Command: /xpopup -j [MENU]

Example: /xpopup -j mymenu

-l



This command lets you set the Nth color in the menu as given by the order listed in /xpopup -p.

Command: /xpopup -l [MENU] [N] [COLOR]

Example: /xpopup -l mymenu 2 $rgb(255,0,0)

-p



This command lets you set the whole menu color palette in one command where [COLORS] is a space separated list of RGB colors.

Command: /xpopup -p [MENU] [COLORS]

Example: /xpopup -p mymenu $rgb(255,0,0) $rgb(0,0,255) ...

Parms :
[COLORS]The colors are in this order:
 
  1. Menu background color
  2. Icon box color
  3. Checkbox color
  4. Disabled checkbox color
  5. Disabled selection box color
  6. Disabled text color
  7. Selection box color
  8. Selection box border color
  9. Separator line color
  10. Text color

-s



This command lets you display a menu.

Command: /xpopup -s [MENU] [+FLAGS] [X] [Y]

Example: /xpopup -s mymenu + 100 100

Parms :
[MENU]Menu name.
[+FLAGS]Menu display style flags.
  Value :
bThe menu is bottom aligned according to the Y value.
cThe menu is center aligned according to the X value.
lThe menu is left aligned according to the X value.
mThe menu items are clickable only with the left mouse button. (default)
nThe menu items are clickable only with the right mouse button.
rThe menu is right aligned according to the X value.
tThe menu is top aligned according to the Y value.
vThe menu is vertically center aligned according to the Y valued.

[X]X coordinate where menu will popup in screen coordinates.
[Y]Y coordinate where menu will popup in screen coordinates.

-t



This command lets you change the menu style.

Command: /xpopup -t [MENU] [STYLE]

Example: /xpopup -t mymenu officexp

-x



This command lets you set the menu extended styles.

Command: /xpopup -x [MENU] [+FLAGS]

Example: /xpopup -x mymenu +dp

Parms :
[MENU]Menu name.
[+FLAGS]Menu extended style flags.
  Value :
dDisabled items display a selection box.
iIcons have a 3D shadow effect when menu item is selected.
pIcons have a plain 3D effect when menu item is selected.


>> $xpopup Identifier



The $xpopup identifier is a given mIRC alias that communicates with the XPopup DLL to extract information from XPopup menus.

ismenu



This property retrieves if a menu exists.

Identifier: $xpopup(menu).ismenu

Example: //echo -a $xdialog(mymenu).ismenu

style



This property retrieves the menu style.

Identifier: $xpopup(menu).style

Example: //echo -a $xdialog(mymenu).style

exstyle



This property retrieves the menu extended styles.

Identifier: $xpopup(menu).exstyle

Example: //echo -a $xdialog(mymenu).exstyle

colors



This property retrieves the menu colors as one line (see /xpopup -p for the list).

Identifier: $xpopup(menu).colors

Example: //echo -a $xdialog(mymenu).colors

color



This property retrieves Nth menu color (see /xpopup -p for the list).

Identifier: $xpopup(menu, N).color

Example: //echo -a $xdialog(mymenu).color


>> /xpop Command



The /xpop command is used to add/modify/remove menu items in XPopup menus.

-a



This command lets you add a menu item.

Command: /xpop -a [MENU] [N N .. N] [TAB] [+FLAGS] [ID] [ICON] ItemText

Example: /xpop -a mymenu 1 0 $chr(9) + 1 1 Menu Item 1

Parms :
[MENU]Menu name.
[+FLAGS]Menu item flags.
  Value :
cItem is checked.
gItem is disabled/grayed.
sAn empty submenu is created for the item ready for menu items.

[ID]Menu item ID as returned on the event handler. (Must be unique)
[ICON]Menu item icon index. (Use 0 for no icon)
ItemTextMenu item text. It can contain mIRC $identifiers that will be evaluated the first time the menu is being displayed. If the item text is meant to be dynamic, you will need to reset the text using /xpop -t.

N.B. A menu item that has a checkmark and an icon displays the icon instead of the checkmark. N.B. Remember to use mIRC's $eval(expression,0) to prevent the mIRC evaluation of the $idents that your text contains.

-c



This command lets you create a submenu on a menu item.

Command: /xpop -c [MENU] [N N .. N]

Example: /xpop -c mymenu 1 1

N.B. If the item already has a submenu, it is destroyed. This can be used to clear a submenu instead of deleting the whole menu item.

-d



This command lets you destroy a submenu on a menu item.

Command: /xpop -d [MENU] [N N .. N]

Example: /xpop -d mymenu 1 1

-f



This command lets you delete a menu item.

Command: /xpop -f [MENU] [N N .. N]

Example: /xpop -f mymenu 1 1

-i



This command lets you change the icon on a menu item.

Command: /xpop -i [MENU] [N N .. N] [TAB] [ICON]

Example: /xpop -i mymenu 1 1 $chr(9) 3

-s



This command lets you change the state flags on an item (see /xpop -a for the switches).

Command: /xpop -s [MENU] [N N .. N] [TAB] [+FLAGS]

Example: /xpop -s mymenu 1 1 $chr(9) +cg

-t



This command lets you change a menu item text.

Command: /xpop -t [MENU] [N N .. N] [TAB] ItemText

Example: /xpop -t mymenu 1 1 $chr(9) $eval($me,0)

N.B. Remember to use mIRC's $eval(expression,0) to prevent the mIRC evaluation of the $idents that your text contains.

>> $xpop Identifier



The $xpop identifier is a given mIRC alias that communicates with the XPopup DLL to extract information in XPopup menu items.)

num



This property retrieves the number of menu items in a submenu.

Identifier: $xpop(menu, N N .. N).enabled

Example: //echo -a $xpop(mymenu, 4).enabled

N.B. The path N N .. N can be root to the number of items on the root menu.

text



This property retrieves the menu item text.

Identifier: $xpop(menu, N N .. N).text

Example: //echo -a $xpop(mymenu, 4).text

icon



This property retrieves the menu item icon index number.

Identifier: $xpop(menu, N N .. N).icon

Example: //echo -a $xpop(mymenu, 4).icon

checked



This property retrieves if a menu item is checked or not.

Identifier: $xpop(menu, N N .. N).checked

Example: //echo -a $xpop(mymenu, 4).checked

enabled



This property retrieves if a menu item is enabled or disabled.

Identifier: $xpop(menu, N N .. N).enabled

Example: //echo -a $xpop(mymenu, 4).enabled

submenu



This property retrieves if a menu item has a submenu or not.

Identifier: $xpop(menu, N N .. N).submenu

Example: //echo -a $xpop(mymenu, 4).submenu

>> XPopup Item Path



The xpopup menus have an engin that parses the given item "path" data to know where to insert/delete/modify a given item in the menu structure. The parameters you supply are a space separated numerical token list of the menu submenus that lead to the menu item position :

Format: N N N ... N

For example : 2 3

This position represents the 3rd menu item of the of the second menu item submenu as shown by the selected item in the picture below:

XPopup Item Path Example
N.B. If you specify a path that does not exist parsing halts and an error is displayed.
N.B. You can use 0 for the last value when inserting a menu item to insert it at the end of the menu.

>> XPopup Events



Events are sent through mIRC's ON SIGNAL event with the signal name being xpopup-[MENU] where [MENU] is the menu name that sent the event. The $1 parameter is the supplied [ID] of the menu item and you see why it's important that this number be unique. A returned value of 0 means no selection was made in the menu.

XPopup DLL



- Development -> ClickHeRe

- General Testing -> bl0x

- #scriptsdb.org @ Undernet @ Webnet
- http://scriptsdb.org


Tha... Help © 2005 Contact